// 颜色变量定义
$primary-green: #BEFF33; // 确认/保存按钮激活色
$primary-blue: #5894F6; // 编辑/选中按钮色
$border-color: #E5E5E5; // 边框浅灰色
$text-main: #0E1C37; // 主文字色
$text-light: #979797; // 次要文字色
$bg-gray: #F5F5F5; // 背景浅灰色

.profile-page {
    background-color: #F2F3F8;
    min-height: 100vh;
.or-header {
    display: flex;
    /* justify-content: space-around ; */
    align-items: center;
    position: fixed;
    top: 0rpx;
    left: 0rpx;
    background: #F2F3F8;
    width: 726rpx;
    height: 150rpx;
    padding-top: 59rpx;
    padding-left: 34rpx;
    z-index: 90;

    text {
        font-family: Source Han Sans CN;
        font-weight: 400;
        font-size: 34rpx;
        color: #0E1C37;
        line-height: 26rpx;
    }
}

.back-btn {
    width: 50px;
    height: 20px;
    margin-right: 183rpx;
}
    // 表单区域
    .form-section {
        background-color: #fff;
        margin: 20rpx 26rpx;
        border-radius: 26rpx;

        // 头像区域
        .avatar-section {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin: 20rpx;
            border-radius: 16rpx;
            padding: 25rpx 25rpx;
            position: relative;
            padding-bottom: 25rpx;

            .avatar-label {
                font-size: 26rpx;
                color: #888B9A;
                // margin-bottom: 20rpx;
            }

            .avatar-box {
                width: 108rpx;
                height: 108rpx;
                border-radius: 50%;
                overflow: hidden;
                position: relative;
                background-color: #f0f0f0;

                .avatar {
                    width: 100%;
                    height: 100%;
                }

                .upload-mask {
                    position: absolute;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 100%;
                    background-color: #D0D4D7;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                }
            }
        }

        .avatar-section::after {
            content: '';
            position: absolute;
            left: 28rpx;
            right: 28rpx;
            bottom: 0;
            height: 1px;
            background-color: #EEF2F3;
        }

        // 自定义修改头像弹窗样式
        .custom-popup {
            padding: 50rpx 40rpx;
            background-color: #fff;
            border-radius: 35rpx 35rpx 0rpx 0rpx;

            .popup-title {
                font-weight: bold;
                font-size: 32rpx;
                color: #0E1C37;
                // text-align: center;  
                margin-bottom: 50rpx;
                margin-top: 15rpx;
            }

            .popup-btn {
                background-color: #BEFF32;
                font-weight: 500;
                font-size: 32rpx;
                color: #0E1C37;
                text-align: center;
                padding: 20rpx 0;
                border-radius: 12rpx;
                margin-bottom: 20rpx;
            }

            .popup-cancel {
                text-align: center;
                font-weight: 400;
                font-size: 32rpx;
                color: #979797;
                margin-top: 45rpx;
            }
        }

        .form-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            height: 98rpx;
            padding: 8rpx 50rpx;
            position: relative;

            .label {
                font-size: 26rpx;
                color: #888B9A;
            }

            .value {
                font-weight: 500;
                font-size: 26rpx;
                color: #0E1C37;
                display: flex;
                align-items: center;
                justify-content: flex-end;
                width: 70%;
                flex-wrap: nowrap;
                overflow: hidden;
                position: relative;

                .selected-skill {
                    background-color: rgba(88, 148, 246, 0.1);
                    border-radius: 21rpx;
                    font-family: Source Han Sans CN;
                    font-weight: 400;
                    font-size: 22rpx;
                    color: #5894F6;
                    margin-right: 10rpx;
                    padding: 8rpx;
                    white-space: nowrap;
                    flex-shrink: 0;
                }

                .text-content {
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    margin-right: 8rpx;
                }

                uni-icons {
                    margin-left: 8rpx;
                }
            }

            .edit-input {
                display: flex;
                align-items: center;
                justify-content: space-between;
                width: 20%;
            }

            .edit-input input {
                flex: 1;
                height: 40px;
                padding: 0 10px;
                border-radius: 8rpx;
            }
        }

        .form-item::after {
            content: '';
            position: absolute;
            left: 51rpx;
            right: 51rpx;
            bottom: 0;
            height: 1px;
            background-color: #EEF2F3;
        }

        // 编辑昵称弹框
        .nickname-popup {
            border-radius: 35rpx 35rpx 0rpx 0rpx;
            background-color: #fff;
            padding: 50rpx;

            .popup-title {
                font-size: 32rpx;
                font-weight: bold;
                color: #0E1C37;
                margin-bottom: 90rpx;
                margin-top: 30rpx;
            }

            .input-wrap {
                height: 90rpx;
                display: flex;
                align-items: center;
                justify-content: space-between;
                border-radius: 10rpx;
                border: 2rpx solid #D0D4D7;
                padding: 0 20rpx;
                margin-bottom: 130rpx;

                .nickname-input {
                    flex: 1;
                    height: 60rpx;
                    font-size: 26rpx;
                }

                .length-tip {
                    font-size: 24rpx;
                    color: #999;
                }
            }

            .save-btn {
                width: 100%;
                height: 80rpx;
                line-height: 80rpx;
                text-align: center;
                font-weight: 500;
                font-size: 32rpx;
                color: #878B9A;
                border-radius: 8rpx;
                margin: 10rpx 0 20rpx 0;
            }

            .cancel-btn {
                text-align: center;
                font-size: 28rpx;
                color: #999;
                margin-bottom: 10rpx;
                margin-top: 50rpx;
            }

            .error-tip {
                position: fixed;
                bottom: 250rpx;
                left: 50%;
                transform: translateX(-50%);
                width: 500rpx;
                height: 86rpx;
                background: #404040;
                box-shadow: 0rpx 9rpx 13rpx 0rpx rgba(64, 64, 64, 0.27);
                border-radius: 16rpx;
                display: flex;
                justify-content: center;
                align-items: center;

                text {
                    font-weight: 500;
                    font-size: 28rpx;
                    color: #FFFFFF;
                }
            }
        }

        /* 性别选择弹框样式 */
        .gender-popup {
            border-radius: 35rpx 35rpx 0rpx 0rpx;
            background-color: #fff;
            padding: 50rpx;

            .popup-title {
                font-size: 32rpx;
                font-weight: bold;
                color: #0E1C37;
                margin-bottom: 90rpx;
                margin-top: 30rpx;
            }

            .gender-options {
                margin-bottom: 30rpx;

                .gender-btn {
                    width: 100%;
                    height: 98rpx;
                    background-color: #BEFF32;
                    font-family: Source Han Sans CN;
                    font-weight: 500;
                    font-size: 32rpx;
                    color: #0E1C37;
                    border-radius: 16rpx;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    margin-bottom: 20rpx;
                }
            }

            .cancel-btn {
                text-align: center;
                font-family: Source Han Sans CN;
                font-weight: 400;
                font-size: 32rpx;
                color: #979797;
                margin-bottom: 10rpx;
                margin-top: 50rpx;
            }
        }

        // 自我描述
        .self-desc-popup {
            border-radius: 35rpx 35rpx 0rpx 0rpx;
            background-color: #fff;
            padding: 50rpx;

            .popup-title {
                font-size: 32rpx;
                font-weight: bold;
                color: #0E1C37;
                margin-bottom: 60rpx;
                margin-top: 15rpx;
            }

            .desc-textarea {
                width: 100%;
                height: 200rpx;
                border-radius: 18rpx;
                border: 2rpx solid #D0D4D7;
                padding: 15rpx 0 0 15rpx;
                font-size: 26rpx;
                color: #0E1C37;
                margin-bottom: 20rpx;
            }

            .tip-text {
                font-family: Source Han Sans CN;
                font-weight: 400;
                font-size: 22rpx;
                color: #5894F6;
                margin-bottom: 30rpx;
                text-align: left;
                width: 100%;
                margin-left: 30rpx;
            }

            .save-btn {
                width: 100%;
                height: 80rpx;
                line-height: 80rpx;
                text-align: center;
                font-size: 32rpx;
                border-radius: 12rpx;
                margin-bottom: 20rpx;
            }

            .cancel-btn {
                text-align: center;
                font-weight: 400;
                font-size: 32rpx;
                color: #979797;
                margin-top: 45rpx;
            }
        }

        // 技能描述
        ::v-deep .popup {

            // 技能弹窗基础样式
            &.skill-popup {

                padding: 60rpx 50rpx 50rpx;
                border-radius: 35rpx 35rpx 0 0;
                background-color: #fff;

                .popup-header {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    margin-bottom: 60rpx;

                    .popup-title {
                        font-size: 32rpx;
                        font-weight: bold;
                        color: #0E1C37;
                    }

                    .cancel-btn {
                        font-size: 28rpx;
                        color: #999;
                    }
                }

                // 编辑删除按钮样式
                .edit-delete-btn {
                    width: 112rpx;
                    height: 42rpx;
                    border-radius: 10rpx;
                    background-color: #EEF2F3;
                    display: flex;
                    justify-content: center;
                    align-items: center;

                    text {
                        font-family: Source Han Sans CN;
                        font-weight: 500;
                        font-size: 22rpx;
                        color: #888B9A;
                    }
                }

                // 取消删除按钮样式
                .cancel-delete-btn {

                    width: 112rpx;
                    height: 42rpx;
                    border-radius: 10rpx;
                    background-color: #FFEDF0;
                    display: flex;
                    justify-content: center;
                    align-items: center;

                    text {
                        font-family: Source Han Sans CN;
                        font-weight: 500;
                        font-size: 22rpx;
                        color: #F53F3F;
                    }
                }

                .skill-tags {
                    display: flex;
                    flex-wrap: wrap;
                    margin-bottom: 10rpx;
                    max-height: 300rpx; // 增加最大高度，允许更多标签
                    overflow-y: auto; // 启用垂直滚动

                    // 删除图标样式由.tag内部的.tag-close定义

                    .tag {
                        display: flex;
                        align-items: center;
                        background-color: #fff; // 未选择白色背景
                        color: #888B9A; // 未选择文字颜色
                        border: 2rpx solid #E5E6EB; // 添加边框
                        padding: 10rpx 20rpx;
                        margin-right: 20rpx;
                        margin-bottom: 20rpx;
                        border-radius: 30rpx;
                        font-size: 26rpx;

                        // 选中状态样式
                        &.selected {
                            background-color: #5894F6; // 选中蓝色背景
                            color: #FFFFFF; // 选中文字白色
                            border-color: #5894F6;
                        }

                        .tag-close {
                            margin-left: 10rpx;
                            font-size: 24rpx;
                            cursor: pointer;
                        }

                        .tag-close > uni-icons {
                            color: #888B9A; // 未选中删除图标颜色
                        }

                        &.selected .tag-close > uni-icons {
                            color: #FFFFFF; // 选中删除图标颜色
                        }
                    }

                    .add-tag {
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        background-color: #FFFFFF;
                        border-radius: 34rpx;
                        border: 2rpx solid #D0D4D7;
                        font-family: Source Han Sans CN;
                        font-weight: 400;
                        font-size: 26rpx;
                        color: #888B9A;
                        padding: 10rpx 20rpx;
                        margin-right: 20rpx;
                        margin-bottom: 20rpx;
                        cursor: pointer;

                        uni-icons {
                            margin-left: 10rpx;
                        }
                    }
                }

                .tag-count {
                    font-size: 24rpx;
                    color: #999;
                    margin-bottom: 50rpx;
                    text-align: left;
                }

                .add-tip {
                    font-size: 24rpx;
                    color: #5894F6;
                    margin-bottom: 100rpx;
                }

                .save-btn {
                    width: 100%;
                    height: 90rpx;
                    line-height: 90rpx;
                    text-align: center;
                    font-size: 32rpx;
                    background-color: #BEFF32; // 绿色保存按钮
                    color: #0E1C37;
                    border-radius: 16rpx;
                    font-weight: 500;
                    border: none;
                }
            }


        }

        // 编辑技能弹窗样式
        .edit-skill-popup {
            width: 620rpx;
            height: 390rpx;
            padding: 40rpx;
            border-radius: 35rpx;
            background-color: #fff;
            // padding-left: 20rpx;
            position: relative;
            top: -70rpx;

            .popup-header {
                display: flex;
                justify-content: space-between;
                align-items: center;
                margin-bottom: 60rpx;

                .popup-title {
                    font-size: 32rpx;
                    font-weight: bold;
                    color: #030405;
                }

                .cancel-edit {
                    font-size: 28rpx;
                    color: #999;
                }
            }

            .popup-input {
                width: 92%;
                height: 80rpx;
                border-radius: 10rpx;
                border: 2rpx solid #D0D4D7;
                padding: 0 20rpx;
                margin: 0 auto;
                font-size: 26rpx;
                font-family: Source Han Sans CN;
                font-weight: 400;
                font-size: 26rpx;
                color: #A2A6B7;
                line-height: 26rpx;
                margin-bottom: 120rpx;
            }

            .confirm-btn {
                width: 98%;
                height: 80rpx;
                line-height: 80rpx;
                text-align: center;
                font-size: 32rpx;
                background-color: #D0D4D7; // 绿色确认按钮
                color: #0E1C37;

                border-radius: 12rpx;
                font-weight: 500;
                border: none;
            }
        }

        // 编辑可兼职时间弹窗（底部弹出）
        .edit-popup {
            padding: 30rpx;
            background-color: #FFFFFF;
            border-radius: 35rpx 35rpx 0rpx 0rpx;

            .section-title {
                display: block;
                font-family: Source Han Sans CN;
                font-weight: bold;
                font-size: 32rpx;
                color: #0E1C37;

                margin: 40rpx 0rpx 50rpx;
            }

            .time-item {
                display: flex;
                justify-content: space-between;
                align-items: center;
                border: 2rpx solid $border-color;
                border-radius: 12rpx;
                padding: 20rpx;
                margin-bottom: 30rpx;


                .time-text {
                    width: 500rpx;
                    display: block;
                    font-size: 26rpx;
                    color: $text-main;
                    flex-shrink: 0;
                    /* 防止文本被压缩 */
                    overflow: hidden;
                    text-overflow: ellipsis;
                    white-space: nowrap;
                }

                .edit-btn {
                    width: 116rpx;
                    height: 56rpx;
                    background: rgba(88, 148, 246, 0.1);
                    border-radius: 28rpx;
                    display: flex;
                    justify-content: center;
                    align-items: center;

                    font-family: Source Han Sans CN;
                    font-weight: 500;
                    font-size: 26rpx;
                    color: #5894F6;
                    opacity: 1;

                }
            }

            .add-btn {
                display: flex;
                align-items: center;
                justify-content: center;
                width: 238rpx;
                height: 68rpx;
                background: #FFFFFF;
                border-radius: 34rpx;
                border: 2rpx solid #D0D4D7;


                font-family: Source Han Sans CN;
                font-weight: 400;
                font-size: 26rpx;
                color: #888B9A;
                margin: 0 auto;
                margin-bottom: 50rpx;
                cursor: pointer;


            }

            .save-btn {
                height: 83rpx;
                background-color: $bg-gray;
                font-family: Source Han Sans CN;
                font-weight: 500;
                font-size: 32rpx;
                color: #0E1C37;
                padding: 20rpx;
                border-radius: 12rpx;
                margin-bottom: 20rpx;
                line-height: 42rpx;

                &:not(:disabled) {
                    background-color: $primary-green;
                    color: $text-main;
                }
            }

            .cancel-btn {
                display: flex;
                justify-content: center;
                align-items: center;
                background-color: transparent;
                color: $text-light;
                font-family: Source Han Sans CN;
                font-weight: 400;
                font-size: 32rpx;
                padding: 10rpx;

            }
        }

        // 选择时间/添加时间弹窗（底部弹出）
        .time-popup,
        .add-time-popup {
            padding: 26rpx;
            background-color: #FFFFFF;
            border-radius: 35rpx;
            margin: 26rpx;

            .popup-header {
                margin-top: 20rpx;
                display: flex;
                justify-content: space-between;
                align-items: center;
                margin-bottom: 80rpx;

                .popup-title {

                    font-size: 32rpx;
                    font-weight: bold;
                    color: $text-main;

                }

                .cancel-edit {
                    width: 112rpx;
                    height: 42rpx;
                    background: #EEF2F3;
                    border-radius: 10rpx;
                    font-weight: 500;
                    font-size: 22rpx;
                    color: #888B9A;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                }
            }

            .modal-body {
                .body-title {
                    display: block;
                    font-family: Source Han Sans CN;
                    font-weight: 500;
                    font-size: 26rpx;
                    color: #0E1C37;
                    margin-top: 10rpx;
                    margin-bottom: 20rpx;
                }

                .weekdays {
                    display: flex;
                    flex-wrap: wrap;
                    margin-bottom: 40rpx;


                    .weekday-btn {
                        display: flex;
                        justify-content: center;
                        align-items: center;
                        width: 144rpx;
                        height: 66rpx;
                        background: #FFFFFF;
                        border-radius: 34rpx;
                        border: 2rpx solid #D0D4D7;
                        font-family: Source Han Sans CN;
                        font-weight: 400;
                        font-size: 26rpx;
                        color: #888B9A;
                        margin-right: 18rpx;
                        margin-bottom: 20rpx;

                        &.no-right-margin {
                            margin-right: 0 !important;
                            /* 使用!important确保覆盖其他样式 */
                        }

                        &.selected {
                            background-color: $primary-blue;
                            color: #fff;
                            font-size: 26rpx;
                            // border: 0;
                            border-color: $primary-blue;
                        }
                    }
                }

                .time-select-container {
                    display: flex;
                    align-items: center;
                    justify-content: start;
                    width: 190rpx;
                    height: 60rpx;
                    background: #FFFFFF;
                    border-radius: 34rpx;
                    border: 2rpx solid #D0D4D7;
                    padding: 2rpx 50rpx;
                    margin-bottom: 60rpx;
                    text-align: center;
                    margin-top: 30rpx;

                }

                .picker-item {
                    // flex: 1;
                    text-align: center;
                    padding: 15rpx 0;
                    font-family: Source Han Sans CN;
                    font-weight: 400;
                    font-size: 26rpx;
                    color: #888B9A;
                }

                .time-separator {
                    display: block;
                    // margin: 0 15rpx;
                    font-family: Source Han Sans CN;
                    font-weight: 400;
                    font-size: 26rpx;
                    color: #888B9A;
                    width: 30rpx;
                    margin-left: 5rpx;

                }


            }

            .popup-buttons {
                .confirm-btn {
                    width: 646rpx;
                    height: 83rpx;
                    background: #D0D4D7;
                    border-radius: 12rpx;
                    font-weight: 500;
                    font-size: 32rpx;
                    color: #888B9A;
                    padding: 20rpx;
                    line-height: 31rpx;

                    &:not(:disabled) {
                        background-color: $primary-green;
                        color: $text-main;
                    }
                }
            }
        }

        // 编辑可接受区域弹窗（底部弹出）
        .area-popup {
            padding: 30rpx;
            background-color: #fff;
            border-radius: 20rpx 20rpx 0 0;

            .section-title {
                font-size: 32rpx;
                font-weight: bold;
                color: #333;
                margin-bottom: 70rpx;
                margin-top: 40rpx;
                display: block;
            }

            .address-input {

                height: 80rpx;
                border: 1rpx solid #eee;
                border-radius: 10rpx;
                padding: 0 20rpx;
                margin-bottom: 20rpx;
                font-size: 28rpx;
            }

            .map-container {
                position: relative;
                width: 100%;
                height: 300rpx;
                margin-bottom: 30rpx;
                border-radius: 10rpx;
                overflow: hidden;
            }

            .map-image {
                width: 100%;
                height: 100%;
            }



            .map-overlay {
                position: absolute;
                top: 54px;
                left: calc(50% - 143rpx);
                width: 286rpx;
                height: 60rpx;
                background: #FFFFFF;
                box-shadow: 1rpx 2rpx 7rpx 0rpx rgba(162, 166, 183, 0.49);
                border-radius: 30rpx;
                display: flex;
                justify-content: center;
                align-items: center;
                font-family: Source Han Sans CN;
                font-weight: 400;
                font-size: 22rpx;
                color: #0E1C37;

                .map-text {
                    margin-left: 10rpx;
                }
            }

            .range-selector {
                // width: 100%;
                height: 80rpx;
                border: 1rpx solid #eee;
                border-radius: 10rpx;
                padding: 0 20rpx;
                margin-bottom: 90rpx;
                display: flex;
                justify-content: flex-start;
                align-items: center;


                .picker-text {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    width: 100%;
                    color: #333;
                    font-size: 28rpx;

                    text {
                        display: block;
                        width: 422rpx;
                    }

                    .uni-icons {

                        margin-left: 10rpx;
                    }
                }
            }

            .btn-group {
                // display: flex;
                // justify-content: space-between;

                button {
                    width: 100%;
                    height: 83rpx;
                    border-radius: 12rpx;
                    font-size: 32rpx;
                    border: none;
                    outline: none;
                    box-shadow: none;

                }
            }

            .cancel-btn {
                background-color: #ffffff;
                font-weight: 400;
                font-size: 32rpx;
                color: #979797;

                &:after {
                    border: 0;
                }
            }

            .save-btn {
                background-color: #d0d4d7;
                font-weight: 500;
                font-size: 32rpx;
                color: #888B9A;
                margin-bottom: 30rpx;


                &.active {
                    background: #BEFF33;
                    color: #0E1C37;
                }
            }
        }

        // 编辑擅长菜系弹框
        .cuisine-popup {
            border-radius: 35rpx 35rpx 0rpx 0rpx;
            background-color: #fff;
            padding: 50rpx;

            .popup-title {
                font-size: 32rpx;
                font-weight: bold;
                color: #0E1C37;
                margin-bottom: 60rpx;
                margin-top: 15rpx;
            }

            .desc-textarea {
                width: 100%;
                height: 200rpx;
                border-radius: 18rpx;
                border: 2rpx solid #D0D4D7;
                padding: 15rpx 0 0 15rpx;
                font-size: 26rpx;
                color: #0E1C37;
                margin-bottom: 20rpx;
            }

            .tip-text {
                font-family: Source Han Sans CN;
                font-weight: 400;
                font-size: 22rpx;
                color: #5894F6;
                margin-bottom: 30rpx;
                text-align: left;
                width: 100%;
                margin-left: 30rpx;
            }

            .save-btn {
                width: 100%;
                height: 80rpx;
                line-height: 80rpx;
                text-align: center;
                font-size: 32rpx;
                border-radius: 12rpx;
                margin-bottom: 20rpx;
            }

            .cancel-btn {
                text-align: center;
                font-weight: 400;
                font-size: 32rpx;
                color: #979797;
                margin-top: 45rpx;
            }
        }



        // 实名认证特殊样式
        .auth-item .value {
            font-size: 26rpx;
            color: #5894F6;
        }

        // 绑定项特殊样式
        .bind-item .value {
            font-size: 26rpx;
            color: #5894F6;
        }
    }
}